using System;
using System.Globalization;
using System.Windows.Data;

namespace MathematicallySafe.HeadCounter.Converters
{
    public class PlusMinusColourConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var v = (double) value;

            if (v < 0)
            {
                return "Red";
            }

            if (v >= 0)
            {
                return "Blue";
            }

            return "Black";
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return null;
        }

        #endregion
    }
}